<%@ Page Title="" Language="C#" MasterPageFile="~/Main.Master" AutoEventWireup="true" CodeBehind="Edit_User.aspx.cs" Inherits="BOComplementare.admin.access.Edit_User" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    
    <section class="panel">
	    <header class="panel-heading">
					<h2>User Information</h2>
			</header>
			<div class="panel-tools" align="right">
				<ul class="tooltip-area">
					<li><a href="javascript:void(0)" class="btn btn-collapse" title="Collapse"><i class="fa fa-sort-amount-asc"></i></a></li>
					<li><a href="javascript:void(0)" class="btn btn-reload"  title="Reload"><i class="fa fa-retweet"></i></a></li>
					<li><a href="javascript:void(0)" class="btn btn-close" title="Close"><i class="fa fa-times"></i></a></li>
				</ul>
			</div>
			<div class="panel-body">

                <!-- PUT YOUR CONTENT HERE -->
    <form id="form1" runat="server">   
        <table class="webparts">
            <tr>
                <td class="details" style="vertical-align:top">

                    <h3>Roles:</h3>
                    <asp:CheckBoxList ID="UserRoles" runat="server" />

                    <h3>Main Info:</h3>
                    <asp:DetailsView AutoGenerateRows="False" DataSourceID="MemberData" ID="UserInfo" runat="server" OnItemUpdating="UserInfo_ItemUpdating">
  
                        <Fields>
	                        <asp:BoundField DataField="UserName" HeaderText="User Name" ReadOnly="True" HeaderStyle-CssClass="detailheader" ItemStyle-CssClass="detailitem"></asp:BoundField>
	                        <asp:BoundField DataField="Email" HeaderText="Email" HeaderStyle-CssClass="detailheader" ItemStyle-CssClass="detailitem"></asp:BoundField>
	                        <asp:BoundField DataField="Comment" HeaderText="Comment" HeaderStyle-CssClass="detailheader" ItemStyle-CssClass="detailitem"></asp:BoundField>
	                        <asp:CheckBoxField DataField="IsApproved" HeaderText="Active User" HeaderStyle-CssClass="detailheader" ItemStyle-CssClass="detailitem" />
	                        <asp:CheckBoxField DataField="IsLockedOut" HeaderText="Is Locked Out" ReadOnly="true" HeaderStyle-CssClass="detailheader" ItemStyle-CssClass="detailitem" />
	
	                        <asp:CheckBoxField DataField="IsOnline" HeaderText="Is Online" ReadOnly="True" HeaderStyle-CssClass="detailheader" ItemStyle-CssClass="detailitem" />
	                        <asp:BoundField DataField="CreationDate" HeaderText="CreationDate" ReadOnly="True" HeaderStyle-CssClass="detailheader" ItemStyle-CssClass="detailitem"></asp:BoundField>
	                        <asp:BoundField DataField="LastActivityDate" HeaderText="LastActivityDate" ReadOnly="True" HeaderStyle-CssClass="detailheader" ItemStyle-CssClass="detailitem"></asp:BoundField>
	                        <asp:BoundField DataField="LastLoginDate" HeaderText="LastLoginDate" ReadOnly="True" HeaderStyle-CssClass="detailheader" ItemStyle-CssClass="detailitem"></asp:BoundField>
	                        <asp:BoundField DataField="LastLockoutDate" HeaderText="LastLockoutDate" ReadOnly="True" HeaderStyle-CssClass="detailheader" ItemStyle-CssClass="detailitem"></asp:BoundField>
	                        <asp:BoundField DataField="LastPasswordChangedDate" HeaderText="LastPasswordChangedDate" ReadOnly="True" HeaderStyle-CssClass="detailheader" ItemStyle-CssClass="detailitem"></asp:BoundField>
	                        <asp:CommandField ButtonType="button" ShowEditButton="true" EditText="Edit User Info" />
                        </Fields>

                    </asp:DetailsView>

                    <div class="alert" style="padding: 5px;">
                        <asp:Literal ID="UserUpdateMessage" runat="server">&nbsp;</asp:Literal>
                    </div>


                    <div style="text-align: right; width: 100%; margin: 20px 0px;">
                        <asp:Button ID="Button1" runat="server" Text="Unlock User" OnClick="UnlockUser" OnClientClick="return confirm('Click OK to unlock this user.')" />
                        &nbsp;&nbsp;&nbsp;
                        <asp:Button ID="Button2" runat="server" Text="Delete User" OnClick="DeleteUser" OnClientClick="return confirm('Are Your Sure?')" />
                    </div>

                    <asp:ObjectDataSource ID="MemberData" runat="server" DataObjectTypeName="System.Web.Security.MembershipUser" SelectMethod="GetUser" UpdateMethod="UpdateUser" TypeName="System.Web.Security.Membership">
	                    <SelectParameters>
		                    <asp:QueryStringParameter Name="username" QueryStringField="username" />
	                    </SelectParameters>
                    </asp:ObjectDataSource> 
                </td>

            </tr>
        </table>
    </form>

			</div>
			<footer class="panel-footer">
				<button type="submit" class="btn" data-color="#F4AD41">Submit</button>
				<button type="reset" class="btn">Cancel</button>
			</footer>
	</section>      
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="LocaJavascript" runat="server">
</asp:Content>
